<?php
    $mys = new mysqli("localhost","root","root","zol3c");
    if($mys->connect_errno != 0){
        die();
    }
    $id = $_GET["id"];
    $res = $mys->query("select * from ${id}");
    for($i = 0;$i < $res->num_rows; $i++){
        $data[] = $res->fetch_assoc();
    }
    print_r(json_encode($data));
?>